package com.doradance.app.home;

/**
 * Created by Zoi.
 * E-mail：KyluZoi@gmail.com
 * 2017/2/8
 */

import android.content.Context;
import android.view.View;
import android.widget.ImageView;

import com.bigkoo.convenientbanner.holder.Holder;
import com.bumptech.glide.Glide;
import com.doradance.R;
import com.doradance.common.image.IML;
import com.doradance.entity.BannerEntity;
import com.doradance.entity.IndexEntity;

/**
 * 指示器holder
 */
public class LocalImageHolderView implements Holder<IndexEntity.BannersBean> {
    private ImageView imageView;

    @Override
    public View createView(Context context) {
        imageView = new ImageView(context);
        imageView.setScaleType(ImageView.ScaleType.CENTER_CROP);
        return imageView;
    }

    @Override
    public void UpdateUI(Context context, int position, IndexEntity.BannersBean data) {
//        IML.load(context, imageView, data.getImage());
        Glide.with(context).load(data.getImage()).placeholder(R.mipmap.icon_video_head).into(imageView);
    }


}
